Windows Tools

ADMT Command-line Examples

Open Command Prompt

Example 1: Identifying Service Accounts

In this example, the computer Member1 is searched for services not using the LocalSystem account. Information about these accounts on Member1 is noted in the ADMT database.

Only those settings which differ from the default settings of ADMT need to be specified at the command prompt. The following table shows the parameters needed and notes which actions occur by default. Default actions will be left out of the command.

Action Command
Specify the name of the computer to search /N "AliceG" "BobA"
Specify source domain /SD:"NY-ACCT"
Specify target domain /TD:"reskit.com"

Open Notepad and type the following command:

ADMT service /N "Member1" /SD:"NY-ACCT" /TD:"reskit.com"

On the computer that has ADMT installed save this file as ServAccMig.cmd. Open the command prompt and change to the directory containing the ServAccMig.cmd file. Type the following command and press Enter:

ServAccMig.cmd

Example 2: Migrating User Accounts

In this example, the user accounts AliceG and BobA are migrated from the NY-ACCT source domain to the reskit.com target domain. The target organizational unit is NY-ACCT. During the migration complex passwords are generated and stored in a file called password.txt. This file is saved in the C:\Program Files\Active Directory Migration Tool\Logs directory. This example leaves both accounts enabled after migration, migrates source SIDS, translates roaming profiles, updates user rights, does not rename accounts with duplicate names in the target domain, replaces duplicate user accounts that already exist in the target domain with those from the source domain.

Only those settings which differ from the default settings of ADMT need to be specified at the command prompt. The following table shows the parameters needed and notes which actions occur by default. Default actions will be left out of the command.

Action Command
Specify user accounts to migrate /N "AliceG" "BobA"
Specify source domain /SD:"NY-ACCT"
Specify target domain /TD:"reskit.com"
Specify target OU /TO:"NY-ACCT"
Specify password generation /PO:Complex
Specify location and name of password file /PF:"C:\Program Files\Active Directory Migration Tool\Logs\Password.txt"
Migrate source user SID to target account /MSS:Yes
Translate existing roaming profiles /TRP:Yes
Specifies rename action when a duplicate account exists in the target domain /RO:Dont (This default action does not need to be specified in the command.)
Replace existing accounts in the target domain with the account in the source domain /CO:Replace

Open Notepad and type the following command:

ADMT user /N "AliceG" "BobA" /SD:"NY-ACCT" /TD:"reskit.com" /TO:"NY-ACCT" /PO:Complex /PF:"C:\Program Files\Active Directory Migration Tool\Logs\Password.txt" /MSS:Yes /TRP:Yes /CO:Replace 

On the computer that has ADMT installed save this file as UserAccMig.cmd. Open the command prompt and change to the directory containing the UserAccMig.cmd file. Type the following command and press Enter:

UserAccMig.cmd

Example 3: Migrating Computers

In this example, the member server Member1 is migrated from the NY-ACCT source domain to the reskit.com target domain. The target organizational unit for the computer account is NY-ACCT. During the migration the computer will be set to reboot one minute after completion of the migration, duplicate accounts will not be renamed, nor will they be migrated.

Only those settings which differ from the default settings of ADMT need to be specified at the command prompt. The following table shows the parameters needed and notes which actions occur by default. Default actions will be left out of the command.

Action Command
Specify user accounts to migrate /N "Member1"
Specify source domain /SD:"NY-ACCT"
Specify target domain /TD:"reskit.com"
Specifies how many minutes to wait before restarting the migrated computer /RD:1
Specifies how to rename duplicate accounts /RO:Dont
Specifies how to handle conflicting accounts /CO:Ignore

Open Notepad and type the following command:

ADMT computer /N "Member1" /SD:"NY-ACCT" /TD:"reskit.com" /TO:"NY-ACCT" /RD:1 /RO:Dont /CO:Ignore

On the computer that has ADMT installed save this file as CompMig.cmd. Open the command prompt and change to the directory containing the CompMig.cmd file. Type the following command and press Enter:

CompMig.cmd